import store from '@/store'

let title = ''
store.dispatch('user/setWebInfo').then((res) => {
  title = res
})
export default function getPageTitle(pageTitle) {
  if (pageTitle) {
    if (title) {
      return `${pageTitle} - ${title}`
    } else {
      return pageTitle
    }
  }
  return `${title}`
}
